package com.elicitor.listner;

import javax.sound.sampled.AudioFileFormat;
import javax.sound.sampled.AudioFormat;



public class Testss {

    public static void main(String[] args) throws Exception {
        MicrophoneRecorder mr = new MicrophoneRecorder(new AudioFormat(22000, 16, 2, true, true));
        mr.start();
        Thread.sleep(5000);
        mr.stop();
        //save
        WaveData wd = new WaveData();
        Thread.sleep(3000);
        wd.saveToFile("~tmp", AudioFileFormat.Type.WAVE, mr.getAudioInputStream());
    }


}
